1. Field of the Invention
This invention relates to distributed file server systems and, more particularly, to cache memory data lock management for such systems.
2. Description of the Related Art
Computing systems consisting of workstations or terminals connected to a central computer or mainframe by a fast local area network have become widespread. Such systems are used for executing general office tasks, engineering design, software development, and many other applications. Future systems promise to provide an information processing environment that will include thousands of workstations, as well as many mid-size machines or mainframes, all interconnected by one or more local area networks (LANs). The workstations in such systems need to share resources, both for economic reasons and due to the nature of applications. Systems that share resources such as system hardware and software, system data, and user software and data, are known as distributed file systems.
The sharing of data objects such as data files and databases generally is administered through the use of file servers. The file servers comprise computing units that are interposed between individual workstations and the local area network. In addition to managing the sharing of resources, file servers also provide such services as automatic backup and recovery, user mobility, and management of cache workstation memories. The distributed file system allows for replication of files and/or storing data files in cache memory on various levels of storage hierarchy. A cache memory consists of a memory associated with a particular workstation in which may reside copies of data objects from a primary location of data storage, such as the file server or a mid-size machine or mainframe. The workstation carries out operations on its copy of a data object rather than on the data object maintained in the primary location of data storage. Caching of data at a workstation level, if done properly, can improve system performance because it permits data to be accessed without the intervention of the file server. Such caching, however, introduces the problem of data coherency between the cache data and the data at the primary location of data storage. Data coherency refers to insuring that only a single image of a data object exists or that the system at least performs as if only a single image exists. With large data caches, the data traffic between file servers and workstations required to maintain data coherency can be the dominant factor in effective data access time and cache performance. Most conventional approaches to data coherency fall into one of two categories, those that assume reliable broadcast, and therefore cannot tolerate communication failures, and those that require a check for consistency in every data read and therefore suffer from excessive overhead. A system preferably provides failure tolerance and therefore attempts have been made to reduce overhead while providing coherency.
Conventional cache file systems that have provided data coherency do so by utilizing data locks. When a client, such as a local workstation terminal or an application, requires access to a data object, it must request access to the data object from a file server. Conventional caching systems provide coherency by granting data locks with either a zero lifetime or an infinite lifetime. A zero lifetime lock, for example, is granted when the client workstation will immediately execute a write command upon receiving the lock and then release its data lock, thereafter providing other users with a chance to write data. An infinite lifetime lock is held by the client to whom it was granted for as long as the client desires it.
System efficiency is optimized in the case of data files that are highly shared by granting zero lifetime locks. This minimizes delay resulting from processor failures and from communication failures, such as when a data object is being accessed by one workstation at the same time access is requested by another workstation. System efficiency is improved in the case of system files, which are repeatedly accessed but rarely written, with an infinite lifetime lock. This permits client workstations to complete extended read operations without interruption.
Attempts have been made to combine the advantages of the two lock lifetime extremes. For example, Sturgis, Mitchell and Israel in the July 1980 issue of Operating Systems Review, pp. 55-69, describe a distributed file system that uses breakable locks with time limits. The locks, however, have a minimum lifetime before they can be broken. Because clients in the Sturgis et al. system are not reliably notified when a lock is broken, the system actually resembles a system with locks of zero lifetime. That is, locks are released as soon as read or write operations are completed. U.S. Pat. No. 4,716,528 to Crus describes a method for utilizing a coordinated pair of locking limits to manage data concurrency and adjust lock granularity. Again, however, all the data locks have a predetermined zero or infinite lifetime. U.S. Pat. No. 4,965,719 to Shoens describes a method for increasing throughput and maintaining page coherency in a multiple processing environment with predetermined lock lifetimes.
From the discussion above, it should be apparent that there is a need for a distributed file system in which data coherency is assured and data locks are optimal lock lifetimes that are provided for highly shared files and rarely written files. The present invention satisfies this need.